﻿using System;
using Autodesk.Revit.DB;

namespace FetchDataCompare
{
	internal class GeoDetailCurveStruct : GeoObjectStructBase, IGeoObjectStruct
	{
		public GeoDetailCurveStruct(Element element, Autodesk.Revit.DB.View view) : base(element, view)
		{
			base.Attribute = this.GetElementAttribute();
		}

		public GeoDetailCurveStruct()
		{
		}

		public override string GetElementAttribute()
		{
			string elementAttribute = base.GetElementAttribute();
			this.GetExtendAttribute(ref elementAttribute);
			return elementAttribute;
		}

		public void GetExtendAttribute(ref string attr)
		{
			DetailCurve detailCurve = base.UseElement as DetailCurve;
			if (detailCurve == null)
			{
				attr = (attr ?? "");
				return;
			}
			LocationCurve locationCurve = detailCurve.Location as LocationCurve;
			base.GetStartAndEndPoint(locationCurve.Curve, ref attr);
		}
	}
}
